import static org.junit.Assert.*;

import java.util.ArrayList;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class BankTest {
	Bank bank;
	ArrayList<CheckingAccount> checking;
	ArrayList<SavingsAccount> savings;
	@Before
	public void setUp() throws Exception {
		
	}
	
	@After
	public void tearDown() throws Exception {
	}
	
	@Test
	public void testBank() {
		
		bank = new Bank("Bank of America");
		assertTrue(bank.getBankName().equals("Bank of America"));
	}
	
	@Test
	public void testGetBankName() {
		bank = new Bank("Bank of America");
		assertTrue(bank.getBankName().equals("Bank of America"));
	}
	
	@Test
	public void testOpenSimpleSavingsAccount() {
		bank = new Bank("Bank of America");
		bank.openSimpleSavingsAccount();
		assertTrue(bank.getSavingsAccount(123456).fName.equals("Bob Smith"));
	}
	
	@Test
	public void testOpenSimpleSavingsAccountStringStringStringStringStringInt() {
		bank = new Bank("Bank of America");
		bank.openSimpleSavingsAccount("name", "street", "12587", "town", "country", 357950);
		assertTrue(bank.getSavingsAccount(357950).fName.equals("name"));
	}
	
	@Test
	public void testOpenSimpleCheckingAccount() {
		bank = new Bank("Bank of America");
		bank.openSimpleCheckingAccount();
		assertTrue(bank.getCheckingAccount(123456).fName.equals("Bob Smith"));
	}
	
	@Test
	public void testOpenSimpleCheckingAccountStringStringStringStringStringInt() {
		bank = new Bank("Bank of America");
		bank.openSimpleCheckingAccount("name", "street", "12587", "town", "country", 357950);
		assertTrue(bank.getCheckingAccount(357950).fName.equals("name"));
	}
	
	@Test
	public void testOpenFullPackage() {
		bank = new Bank("Bank of America");
		bank.openFullPackage();
		assertTrue(bank.getCheckingAccount(123456).fName.equals("Bob Smith"));
	}
	
	@Test
	public void testOpenFullPackageStringStringStringStringStringIntInt() {
		bank = new Bank("Bank of America");
		bank.openFullPackage("name", "street", "12587", "town", "country", 357950, 357951);
		assertTrue(bank.getSavingsAccount(357950).fName.equals("name"));
		assertTrue(bank.getCheckingAccount(357951).fName.equals("name"));
	}
	
	@Test
	public void testGetCheckingAccount() {
		bank = new Bank("Bank of America");
		bank.openSimpleCheckingAccount("name", "street", "12587", "town", "country", 357950);
		assertTrue(bank.getCheckingAccount(357950).fName.equals("name"));
	}
	
	@Test
	public void testGetSavingsAccount() {
		bank = new Bank("Bank of America");
		bank.openSimpleSavingsAccount();
		assertTrue(bank.getSavingsAccount(123456).fName.equals("Bob Smith"));
	}
	
}
